package com.wenbai.servicelightluxurystickers.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.wenbai.servicelightluxurystickers.entity.StickComment;
import com.wenbai.servicelightluxurystickers.entity.StickManage;
import com.wenbai.servicelightluxurystickers.entity.dto.CommentPageQueryDto;
import com.wenbai.servicelightluxurystickers.entity.vo.parentUserVO;
import com.wenbai.servicelightluxurystickers.entity.vo.userVO;
import org.apache.ibatis.annotations.*;

@Mapper
public interface StickCommentMapper extends BaseMapper<StickManage> {


    Page<userVO> pageByPostId(CommentPageQueryDto commentPageQueryDto);

    Page<parentUserVO> pageByCommentId(CommentPageQueryDto commentPageQueryDto);

    @Delete("delete from stick_comment where comment_id = #{commentId}")
    void deleteByCommentId(Long commentId);

    int insert(@Param("stickComment") StickComment stickComment);
}

